from flask import Flask
from flask import render_template
from flask import jsonify
import views
from config import *

app = Flask(__name__)

app.config['MAX_CONTENT_LENGTH'] = UPLOAD_LIMIT
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER


@app.route("/", methods=["GET"])
def hello_world():
    return render_template("index.html")


@app.route("/api/recognize", methods=["POST"])
def recognize():
    return jsonify(views.recognize())


if __name__ == '__main__':
    app.debug = True
    app.run()
